.class public Lcom/TwinBlade/PicturePassword/HomeLauncher;
.super Landroid/app/Activity;
.source "SourceFile"


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 9
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    return-void
.end method


# virtual methods
.method public onResume()V
    .locals 4

    .prologue
    const/4 v3, 0x1

    .line 14
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 15
    const-string v1, "HomeLauncher"

    const-string v2, ""

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 17
    invoke-static {}, Lcom/TwinBlade/PicturePassword/bl;->b()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 18
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/HomeLauncher;->finish()V

    .line 52
    :goto_0
    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    .line 53
    return-void

    .line 19
    :cond_0
    sget-boolean v1, Lcom/TwinBlade/PicturePassword/Utilities;->a:Z

    if-eqz v1, :cond_2

    .line 20
    invoke-static {v3, v3}, Lcom/TwinBlade/PicturePassword/Utilities;->a(ZZ)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 21
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/AService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 22
    const-string v1, "OnBoot"

    invoke-virtual {v0, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 23
    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/HomeLauncher;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    .line 26
    :cond_1
    const/4 v0, 0x0

    sput-boolean v0, Lcom/TwinBlade/PicturePassword/Utilities;->a:Z

    goto :goto_0

    .line 27
    :cond_2
    const-string v1, ""

    if-eq v0, v1, :cond_3

    .line 29
    :try_start_0
    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.intent.action.MAIN"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 30
    invoke-static {v0}, Landroid/content/ComponentName;->unflattenFromString(Ljava/lang/String;)Landroid/content/ComponentName;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

    .line 31
    const-string v2, "android.intent.category.HOME"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

    .line 32
    const/high16 v2, 0x80

    invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 33
    invoke-virtual {p0, v1}, Lcom/TwinBlade/PicturePassword/HomeLauncher;->startActivity(Landroid/content/Intent;)V

    .line 34
    const/high16 v1, 0x7f04

    const v2, 0x7f040001

    invoke-virtual {p0, v1, v2}, Lcom/TwinBlade/PicturePassword/HomeLauncher;->overridePendingTransition(II)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 35
    :catch_0
    move-exception v1

    .line 37
    :try_start_1
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/HomeLauncher;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v1

    invoke-static {v0}, Landroid/content/ComponentName;->unflattenFromString(Ljava/lang/String;)Landroid/content/ComponentName;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/content/pm/PackageManager;->getLaunchIntentForPackage(Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v0

    .line 38
    const-string v1, "android.intent.category.HOME"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

    .line 39
    const/high16 v1, 0x80

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 40
    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/HomeLauncher;->startActivity(Landroid/content/Intent;)V

    .line 41
    const/high16 v0, 0x7f04

    const v1, 0x7f040001

    invoke-virtual {p0, v0, v1}, Lcom/TwinBlade/PicturePassword/HomeLauncher;->overridePendingTransition(II)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_0

    .line 42
    :catch_1
    move-exception v0

    .line 43
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/HomeChooser;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 44
    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/HomeLauncher;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    .line 48
    :cond_3
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/HomeChooser;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 49
    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/HomeLauncher;->startActivity(Landroid/content/Intent;)V

    goto/16 :goto_0
.end method
